Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to improve font style fidelity (especially on Windows and macOS) by explicitly tracking and applying a font’s styleName alongside the family, ensuring the UI dialogs and underlying rich text state stay consistent.
Changes:
- Added
fontStyleNameas a QML-exposed property onQmlRichTextand implemented getter/setter behavior. - Updated the rich text filter UI to round-trip
styleNamethrough the font dialog. - Updated
TextFilterUi.qmlto persist a separateshotcut:fontStyleproperty and normalize the font family passed intoQt.font().
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/qmltypes/qmlrichtext.h |
Exposes fontStyleName as a Q_PROPERTY for QML consumption. |
src/qmltypes/qmlrichtext.cpp |
Implements reading/applying QFont::styleName() through cursor char formats. |
src/qml/modules/Shotcut/Controls/TextFilterUi.qml |
Stores style name separately and adjusts family/style mapping when initializing the font dialog. |
src/qml/filters/richtext/vui.qml |
Ensures rich text font dialogs set/apply styleName alongside family and size. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds support for preserving/setting a font’s Qt styleName across the rich text editor and text filter UIs to correct font style behavior on Windows and macOS.
Changes:
- Expose
fontStyleNameas a new QML property onQmlRichTextand implement getter/setter in C++. - Persist a new filter parameter
shotcut:fontStyleand map it into/out ofQt.font()inTextFilterUi.qml. - Update the rich text font dialog wiring to round-trip
styleName(and fix aseelctedFonttypo).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/qmltypes/qmlrichtext.h | Adds fontStyleName Q_PROPERTY, accessor, mutator, and notify signal. |
| src/qmltypes/qmlrichtext.cpp | Implements fontStyleName() / setFontStyleName() and emits change notifications on reset. |
| src/qml/modules/Shotcut/Controls/TextFilterUi.qml | Persists shotcut:fontStyle and uses it when initializing/updating the font dialog selection. |
| src/qml/filters/richtext/vui.qml | Ensures font dialog round-trips styleName and fixes a typo accessing selectedFont. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR improves font style handling in Shotcut’s QML-based text UIs to better preserve/select platform-specific font variants (notably on Windows and macOS) by introducing and propagating a styleName concept.
Changes:
- Added a
fontStyleNameQ_PROPERTY toQmlRichTextand implemented getter/setter usingQFont::styleName. - Updated
TextFilterUi.qmlto interpret the MLTstyleproperty as eithernormal/italicor a non-standard font style name, and to pass that intoQt.font({ styleName }). - Updated rich text UI to round-trip
selectedFont.styleNameand fixed a typo that preventedselectedFont.pointSizefrom being set.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/qmltypes/qmlrichtext.h | Exposes fontStyleName to QML via a new property + signal/slot. |
| src/qmltypes/qmlrichtext.cpp | Implements reading/applying font styleName on the current text cursor format. |
| src/qml/modules/Shotcut/Controls/TextFilterUi.qml | Updates text filter font selection to preserve non-standard style names via the existing style property. |
| src/qml/filters/richtext/vui.qml | Propagates styleName into/out of the font dialog and fixes a misspelled selectedFont reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.